<template>
	<view>
		<view>
			<image src="../../../static/vr.jpeg" style="width: 700upx;height: 240upx;margin-left: 25upx;margin-top: 20upx;border-radius: 10upx;"></image>
		</view>
		<view class="list_flex">
			<view class="list" v-for="(itam,index) in conf" @click="tz(itam.id)" :key="index">
				<image style="height: 200rpx;border-radius: 10rpx;" :src="itam.faceUrl" mode=""></image>
				<text class="lisi_t">{{itam.name}}</text>
				<!-- <text class="lisi_c">{{itam.name}}</text> -->
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				conf:[],
				ttou:[],
				id:[]
			}
		},
		onLoad(option) {
			this.ttou = option.na
			this.id = option.id
			console.log(this.id)
		},
		onShow(){
			uni.setNavigationBarTitle({
			    title:this.ttou
			});
			console.log(uni.getStorageSync('token'))
		},
		created() {
			let that = this
			let params = {
			  "id":that.id,
			  "pageNo":1,
			  "pageSize":99999
			}
			that.pyReq(that.$http.getVRListByType,params,function(res){
					that.conf = res.result
			});
			// let headers={
			// 	 'content-type': 'application/x-www-form-urlencoded',
			// 	 'token': uni.getStorageSync('token')
			// }
			//  uni.request({
			// 	  url: that.$http.getVRListByType,
			// 	  method: 'POST',
			// 	  data: params,
			// 	  header: headers,
			// 	  success: (res)=>{
			// 		  console.log(res)
			// 		  that.conf = res.data.result
			// 	  },
			// 	  fail: (err)=>{
			// 		  console.log(err)
			// 	  }
			// })  
		},
		methods:{
			tz(id){
				let that = this
				uni.navigateTo({
					url:'./xq?id='+id
				})
			}
		}
	}
</script>

<style>
	.list_flex{
		display: flex;
		margin: 0 30rpx;
		justify-content: space-between;
		flex-wrap: wrap;
	}
	.list {
		/* margin: 18upx 30upx; */
		flex: 0 0 48%;
		/* border-bottom: 1upx solid #999999; */
		padding-bottom: 20upx;
	}
	.lisi_c{
		font-size: 26upx;
		max-height: 60upx;
		line-height: 33upx;
		overflow: hidden;
		-webkit-line-clamp: 2;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		clear: both;
	}
</style>
